<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Copyright © 2006-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>OpenACC Runtime Library Routines (GNU libgomp)</title>

<meta name="description" content="OpenACC Runtime Library Routines (GNU libgomp)">
<meta name="keywords" content="OpenACC Runtime Library Routines (GNU libgomp)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Library-Index.html" rel="index" title="Library Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="index.html" rel="up" title="Top">
<link href="OpenACC-Environment-Variables.html" rel="next" title="OpenACC Environment Variables">
<link href="Enabling-OpenACC.html" rel="prev" title="Enabling OpenACC">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
-->
</style>


</head>

<body lang="en">
<div class="chapter-level-extent" id="OpenACC-Runtime-Library-Routines">
<div class="nav-panel">
<p>
Next: <a href="OpenACC-Environment-Variables.html" accesskey="n" rel="next">OpenACC Environment Variables</a>, Previous: <a href="Enabling-OpenACC.html" accesskey="p" rel="prev">Enabling OpenACC</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Library-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h2 class="chapter" id="OpenACC-Runtime-Library-Routines-1"><span>6 OpenACC Runtime Library Routines<a class="copiable-link" href="#OpenACC-Runtime-Library-Routines-1"> &para;</a></span></h2>

<p>The runtime routines described here are defined by section 3 of the OpenACC
specifications in version 2.6.
They have C linkage, and do not throw exceptions.
Generally, they are available only for the host, with the exception of
<code class="code">acc_on_device</code>, which is available for both the host and the
acceleration device.
</p>



<ul class="mini-toc">
<li><a href="acc_005fget_005fnum_005fdevices.html" accesskey="1"><code class="code">acc_get_num_devices</code> &ndash; Get number of devices for given device type</a></li>
<li><a href="acc_005fset_005fdevice_005ftype.html" accesskey="2"><code class="code">acc_set_device_type</code> &ndash; Set type of device accelerator to use.</a></li>
<li><a href="acc_005fget_005fdevice_005ftype.html" accesskey="3"><code class="code">acc_get_device_type</code> &ndash; Get type of device accelerator to be used.</a></li>
<li><a href="acc_005fset_005fdevice_005fnum.html" accesskey="4"><code class="code">acc_set_device_num</code> &ndash; Set device number to use.</a></li>
<li><a href="acc_005fget_005fdevice_005fnum.html" accesskey="5"><code class="code">acc_get_device_num</code> &ndash; Get device number to be used.</a></li>
<li><a href="acc_005fget_005fproperty.html" accesskey="6"><code class="code">acc_get_property</code> &ndash; Get device property.</a></li>
<li><a href="acc_005fasync_005ftest.html" accesskey="7"><code class="code">acc_async_test</code> &ndash; Test for completion of a specific asynchronous operation.</a></li>
<li><a href="acc_005fasync_005ftest_005fall.html" accesskey="8"><code class="code">acc_async_test_all</code> &ndash; Tests for completion of all asynchronous operations.</a></li>
<li><a href="acc_005fwait.html" accesskey="9"><code class="code">acc_wait</code> &ndash; Wait for completion of a specific asynchronous operation.</a></li>
<li><a href="acc_005fwait_005fall.html"><code class="code">acc_wait_all</code> &ndash; Waits for completion of all asynchronous operations.</a></li>
<li><a href="acc_005fwait_005fall_005fasync.html"><code class="code">acc_wait_all_async</code> &ndash; Wait for completion of all asynchronous operations.</a></li>
<li><a href="acc_005fwait_005fasync.html"><code class="code">acc_wait_async</code> &ndash; Wait for completion of asynchronous operations.</a></li>
<li><a href="acc_005finit.html"><code class="code">acc_init</code> &ndash; Initialize runtime for a specific device type.</a></li>
<li><a href="acc_005fshutdown.html"><code class="code">acc_shutdown</code> &ndash; Shuts down the runtime for a specific device type.</a></li>
<li><a href="acc_005fon_005fdevice.html"><code class="code">acc_on_device</code> &ndash; Whether executing on a particular device</a></li>
<li><a href="acc_005fmalloc.html"><code class="code">acc_malloc</code> &ndash; Allocate device memory.</a></li>
<li><a href="acc_005ffree.html"><code class="code">acc_free</code> &ndash; Free device memory.</a></li>
<li><a href="acc_005fcopyin.html"><code class="code">acc_copyin</code> &ndash; Allocate device memory and copy host memory to it.</a></li>
<li><a href="acc_005fpresent_005for_005fcopyin.html"><code class="code">acc_present_or_copyin</code> &ndash; If the data is not present on the device, allocate device memory and copy from host memory.</a></li>
<li><a href="acc_005fcreate.html"><code class="code">acc_create</code> &ndash; Allocate device memory and map it to host memory.</a></li>
<li><a href="acc_005fpresent_005for_005fcreate.html"><code class="code">acc_present_or_create</code> &ndash; If the data is not present on the device, allocate device memory and map it to host memory.</a></li>
<li><a href="acc_005fcopyout.html"><code class="code">acc_copyout</code> &ndash; Copy device memory to host memory.</a></li>
<li><a href="acc_005fdelete.html"><code class="code">acc_delete</code> &ndash; Free device memory.</a></li>
<li><a href="acc_005fupdate_005fdevice.html"><code class="code">acc_update_device</code> &ndash; Update device memory from mapped host memory.</a></li>
<li><a href="acc_005fupdate_005fself.html"><code class="code">acc_update_self</code> &ndash; Update host memory from mapped device memory.</a></li>
<li><a href="acc_005fmap_005fdata.html"><code class="code">acc_map_data</code> &ndash; Map previously allocated device memory to host memory.</a></li>
<li><a href="acc_005funmap_005fdata.html"><code class="code">acc_unmap_data</code> &ndash; Unmap device memory from host memory.</a></li>
<li><a href="acc_005fdeviceptr.html"><code class="code">acc_deviceptr</code> &ndash; Get device pointer associated with specific host address.</a></li>
<li><a href="acc_005fhostptr.html"><code class="code">acc_hostptr</code> &ndash; Get host pointer associated with specific device address.</a></li>
<li><a href="acc_005fis_005fpresent.html"><code class="code">acc_is_present</code> &ndash; Indicate whether host variable / array is present on device.</a></li>
<li><a href="acc_005fmemcpy_005fto_005fdevice.html"><code class="code">acc_memcpy_to_device</code> &ndash; Copy host memory to device memory.</a></li>
<li><a href="acc_005fmemcpy_005ffrom_005fdevice.html"><code class="code">acc_memcpy_from_device</code> &ndash; Copy device memory to host memory.</a></li>
<li><a href="acc_005fattach.html"><code class="code">acc_attach</code> &ndash; Let device pointer point to device-pointer target.</a></li>
<li><a href="acc_005fdetach.html"><code class="code">acc_detach</code> &ndash; Let device pointer point to host-pointer target.</a></li>
<li><a href="acc_005fget_005fcurrent_005fcuda_005fdevice.html"><code class="code">acc_get_current_cuda_device</code> &ndash; Get CUDA device handle.</a></li>
<li><a href="acc_005fget_005fcurrent_005fcuda_005fcontext.html"><code class="code">acc_get_current_cuda_context</code> &ndash; Get CUDA context handle.</a></li>
<li><a href="acc_005fget_005fcuda_005fstream.html"><code class="code">acc_get_cuda_stream</code> &ndash; Get CUDA stream handle.</a></li>
<li><a href="acc_005fset_005fcuda_005fstream.html"><code class="code">acc_set_cuda_stream</code> &ndash; Set CUDA stream handle.</a></li>
<li><a href="acc_005fprof_005fregister.html"><code class="code">acc_prof_register</code> &ndash; Register callbacks.</a></li>
<li><a href="acc_005fprof_005funregister.html"><code class="code">acc_prof_unregister</code> &ndash; Unregister callbacks.</a></li>
<li><a href="acc_005fprof_005flookup.html"><code class="code">acc_prof_lookup</code> &ndash; Obtain inquiry functions.</a></li>
<li><a href="acc_005fregister_005flibrary.html"><code class="code">acc_register_library</code> &ndash; Library registration.</a></li>
</ul>
</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="OpenACC-Environment-Variables.html">OpenACC Environment Variables</a>, Previous: <a href="Enabling-OpenACC.html">Enabling OpenACC</a>, Up: <a href="index.html">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Library-Index.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
